package com.bonuo.crm.service.impl;

import com.bonuo.crm.domain.Client;
import com.bonuo.crm.mapper.ActivityMapper;
import com.bonuo.crm.mapper.ClientMapper;
import com.bonuo.crm.service.ClientService;
import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClientServiceImpl implements ClientService {
    @Autowired
    private ClientMapper clientMapper;
    @Autowired
    private ActivityMapper activityMapper;

    @Override
    @DataScope(provinceAlias = {"client_info"})
    public List<Client> selectClientList(Client client) {
        return clientMapper.selectClientList(client);
    }

    @Override
    public Integer insertClient(Client client) {
        return clientMapper.insertClient(client);
    }

    @Override
    public Integer deleteClientById(Integer id) {
        return clientMapper.deleteClientById(id);
    }

    @Override
    public Integer updateClient(Client client) {
        return clientMapper.updateClient(client);
    }

    @Override
    public String selectClientByTaxNumber(Client client) {
        return clientMapper.selectClientByTaxNumber(client);
    }

    @Override
    public List<Client> selectClientBNList(Client client) {
        return clientMapper.selectClientBNList(client);
    }
}
